import 'package:flutter/material.dart';
import 'package:bookapp/widgets/Find/book_title.dart';
import 'package:bookapp/widgets/Find/book_cover.dart';

import 'package:bookapp/stores/find_store.dart';
import 'package:provider/provider.dart';
import 'package:flutter_mobx/flutter_mobx.dart';


class Find extends StatefulWidget {
  const Find({Key? key}) : super(key: key);

  @override
  State<Find> createState() => _FindState();
}

class _FindState extends State<Find> {
  @override
  Widget build(BuildContext context) {
    final findStore = Provider.of<FindStore>(
      context,
      listen: false,
    );

    return Observer(
      builder: (_) => findStore.tile ? BookTile() : BookCover()
    );
  }
}

